@PACKAGE_INIT@

# Boiler Plate Config file
#
#
# Include our targets
include(CMakeFindDependencyMacro)

# Include the imported targets
include(${CMAKE_CURRENT_LIST_DIR}/QMPTargets.cmake)

# Set the CMakeModule path to include the current (substituted) package 
# directory in order so we can find Dmalloc if we need it
list(APPEND CMAKE_MODULE_PATH @PACKAGE_cmakeModulesDir@)

# This will let us check if we need MPI
set(QMP_MPI @QMP_MPI@)

# This will let us check if we need DMalloc
set(QMP_USE_DMALLOC @QMP_USE_DMALLOC@)

# Resolve dependencies if needed
if( QMP_MPI )
  find_dependency(MPI)
  if( NOT MPI_C_FOUND )
    message(ERROR "Could not find MPI_C")
  endif()
endif()

# Resolve dependencies if needed
if( QMP_USE_DMALLOC )
  find_dependency(Dmalloc REQUIRED)
endif()

# Boiler plate stuff may not be needed now
check_required_components(MPI)
check_required_components(Dmalloc)
check_required_components(QMP)
